package sctu.edu.java.year2016.team07.shihaocheng.day20160605.chapter11_3;

/**
 * Created by admin on 2016/6/5.
 */
public class CalcMax {

    public static double count(double a,double b){
        double value=1;
        double max;
        double min;
        if(a==b){
            return a;
        }
        if(a>b){
            max=a;
            min=b;
        }else{
            max=b;
            min=a;
        }
        for(int i=2;i<min;i++){
            if(0==max%i && 0==min%i){
                value=i;
            }
        }
        return value;
    }
}
